﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright company="Microsoft Corp." file="AzureRestServiceClientBase.cs">
//   All rights reserved. See License.txt in the project root for license information.
// </copyright>
// 
// --------------------------------------------------------------------------------------------------------------------
namespace AzureManagement
{
    using System.Net;

    using RestClient;

    public abstract class AzureRestServiceClientBase : RestServiceClient
    {
        private const string RequestIdHeader = "x-ms-request-id";

        protected AzureRestServiceClientBase(IRestServiceContext serviceContext)
            : base(serviceContext)
        {
        }

        protected string GetOperationId(WebResponse response)
        {
            return response.Headers[RequestIdHeader];
        }
    }
}